package com.swy.shopgroup.service.impl;


import com.swy.shopgroup.ResultUtils;
import com.swy.shopgroup.dao.GoodsMapper;
import com.swy.shopgroup.dao.MactMapper;
import com.swy.shopgroup.entity.Goods;
import com.swy.shopgroup.entity.Mact;
import com.swy.shopgroup.entity.Result;
import com.swy.shopgroup.service.GoodsService;
import com.swy.shopgroup.service.MactService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class MactServiceImpl implements MactService {

    @Resource
    MactMapper mactMapper;

    @Override
    public Result insertAct(Mact mact) {
        return ResultUtils.success("创建成功", mactMapper.insert(mact));
    }

    @Override
    public Result selectByShop(Long id) {
        return ResultUtils.success("查询成功", mactMapper.selectByShop(id));
    }

    @Override
    public Result selectByState() {
        return ResultUtils.success("查询成功", mactMapper.selectAll());
    }
}
